package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

public class IODemo10 {
    public static void main(String[] args) {
        // try with resource 的写法
        try(InputStream inputStream = new FileInputStream("./test1.txt")){
            // 文件操作逻辑
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
